/*
 * @Description  : 
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2021-12-06 15:17:52
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-03-02 14:29:12
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\choose-famifiar\\set-captain\\set-captain.component.ts
 * Copyright (C) 2022 huzhenhong. All rights reserved.
 */
import {  Component, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { NzModalRef } from 'ng-zorro-antd/modal';

@Component({
  selector: 'app-choose-famifiar-set-captain',
  templateUrl: './set-captain.component.html'
})
export class PublishchooseFamifiarSetCaptainComponent implements OnInit {
  @ViewChild('sf', { static: false }) sf!: SFComponent;
  schema!: SFSchema;
  ui!: SFUISchema;

  i: any;

  constructor( private modal: NzModalRef,) {}

  ngOnInit(): void {
    this.initSF();
  }
  initSF() {
    this.schema = {
      properties: {
        captainPhone: {
          type: 'string',
          title: '车队长手机号'
        }
      },
    };
    this.ui = {
      '*': {
        spanLabelFixed: 120,
        grid: { span: 24 }
      }
    };
  }

  close() {this.modal.close()}
  save() {this.modal.close(this.sf?.value.captainPhone)}
}
